<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    /* 既是div又是box元素，中间不能加空格，不然就成后代选择器了，精确的选择 */
    /* 元素放前面，class放后面 */
  div.box {
    color: red;
    font-size: 30px;
  }
  </style>
</head>
<body>
  <div class="box">我是div元素</div>
  <p class="box">我是p元素</p>
</body>
</html>